package proxy.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyInvocationHandler implements InvocationHandler {

	private Object result;

	public MyInvocationHandler(Object result) {
		this.result = result;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		System.out.println("MyInvocationHandler start");
		Object invoke = method.invoke(result, args);
		System.out.println("MyInvocationHandler end");
		return invoke;
	}
}
